{extends file="index.tpl"}
{block name="page-content"}

<div class="row-fluid">
    <div class="span12">
        <div class="block">
        	<div class="row-form">
                <form method="POST" action="{$WEB_BASE_URL}/index.php?controller=gameTag&action=list&filter=filter">
					<div class="span3">
						<select name="filter" class="select" style="width: 100%;">
							{foreach from=$gameNameArr item=gameTag}
							<option value="{$gameTag.id}" {if isset($filter)}{if $gameTag.id eq $filter}Selected{/if}{/if}>{$gameTag.name}</option>	
							{/foreach}
							<option value="5"></option>
						</select>
					</div>&nbsp;&nbsp;&nbsp;
					<button class="btn btn-primary" type="submit">&nbsp;&nbsp;&nbsp;&nbsp;Fillter&nbsp;&nbsp;&nbsp;&nbsp;</button>
                </form>
			</div>
			
            <div class="head dblue">
                <div class="icon"><span class="ico-layout-9"></span></div>
                <h2>Danh Sách Game Tag</h2>
                <ul class="buttons">
                    <li><a href="#" onClick="source('table_sort_pagination'); return false;">
                        <div class="icon"><span class="ico-info"></span></div>
                    </a></li>
                </ul>
            </div>
            <div class="data-fluid">
                <table class="table lcnp" id="listGame" cellpadding="0" cellspacing="0" width="100%">
                    <thead>
                        <tr>
                            <th width="5%"><input type="checkbox" class="checkall" /></th>
                            <th width="5%">ID</th>
                            <th width="15%">Game Name</th>
                            <th width="25%">Title</th>
                            <th width="40%">Link</th>
                            <th width="12%" class="TAC">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                   	{if isset($gameTagArr)}
                    {foreach from=$gameTagArr item=gameTag}
                        <tr>
                            <td><input type="checkbox" name="order[]" value="528" /></td>
                            <td>{$gameTag.id}</td>
                            <td>{$gameTag.name}</td>
                            <td>{$gameTag.title}</td>
                            <td>{$gameTag.link}</td>
                            <td>
                                <a href="{$WEB_BASE_URL}/index.php?controller=gameTag&action=update&id={$gameTag.id}" class="button green">
                                    <div class="icon"><span class="ico-pencil"></span></div>
                                </a>
                                <a href="{$WEB_BASE_URL}/index.php?controller=gameTag&action=list" class="button red" onclick="return confirm('Bạn có muốn xóa tiếp không?')">
                                    <div class="icon"><span class="ico-remove"></span></div>
                                </a>
                            </td>
                        </tr>
                    {/foreach}
                    {/if}
                    </tbody>
                </table>
                <div class="pagination pagination-centered">
                       {if isset($pageFirst) && isset($pagePrev) && isset($pageList) && isset($pageNext) && isset($pageLast)}
	                	<ul>
	                		<li class="disabled">{$pageFirst}</li>
	                		<li class="active">{$pagePrev}</li>
	                		<li>{$pageList}</li>
	                		<li>{$pageNext}</li>
	                		<li>{$pageLast}</li>
	                    </ul>
	                    {/if}
                    </div>
            </div>
        </div>
    </div>
</div>

{/block}
